import { createApp } from "vue";
import App from "./App.vue";
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
import router from "./routers";

//svg
import "virtual:svg-icons-register";

//import SvgIcon from "@/components/SvgIcon/index.vue";
const app = createApp(App);
//国际化
//@ts-ignore
import zhCn from "element-plus/dist/locale/zh-cn.mjs";
app.use(ElementPlus, { locale: zhCn });
//app.components("SvgIcon", SvgIcon);

//引入插件对象，注册整个项目的全局组件
import golbalComponent from "@/components";
app.use(golbalComponent);

import "@/style/index.scss";

import pinia from "@/store";
//引入路由鉴权
import "@/permission";

//测试接口能否使用
/* import axios from "axios";
axios({
  url: "/api/user/1ogin",
  method: "post",
  data: { username: "admin", password: "111111" },
}); */
app.use(router);
app.use(pinia);

app.mount("#app");
